/*MiniChessTeamAwesome © 2012 by Philipp Lange, Markus Stecher (MIT License)*/

public class Square
{
	public int c,r;

	/*constructor to initialize square with String (e.g. a1)*/
	Square(String s)
	{
		char [] cArray = s.toCharArray();
		c = (int)Character.toLowerCase(cArray[0])-'a';
		r = (int)'6'-cArray[1];
	}

	/*constructor to initialize square with coordinates (1,1 -> row,column (in Array!) -> b5; 2,2 -> c4...)*/
	Square(int r, int c)
	{
		this.c=c;
		this.r=r;
	}
	
	/*returns the Square as a String -> a2*/
	public String toString(){
		char a=(char)((int)'a'+c);
		return ""+a+(6-r);
	}
	
}//endclass Square